class Building < ActiveRecord::Base
  has_many :houses

  scope :name_like, lambda { |name| { :conditions => ['name like ? OR number like ?', '%'+name+'%','%'+name+'%']}}
  
  scope :paginate, lambda { |start,limit| { :offset => start,:limit => limit, }}
end
